package com.example.hrsystem.workflow.model;

import androidx.room.Entity;
import androidx.room.TypeConverters;

import com.example.hrsystem.data.source.DateTypeConverters;

import java.util.Date;

/**
 * 加班申请实体类
 * 继承自ApprovalRequest，包含加班特有的属性
 */
@Entity(tableName = "overtime_requests")
public class OvertimeRequest extends ApprovalRequest {
    // 加班日期
    @TypeConverters(DateTypeConverters.class)
    private Date overtimeDate;

    // 加班开始时间
    @TypeConverters(DateTypeConverters.class)
    private Date startTime;

    // 加班结束时间
    @TypeConverters(DateTypeConverters.class)
    private Date endTime;

    // 加班时长（小时）
    private float hours;

    // 加班类型 (WEEKDAY, WEEKEND, HOLIDAY)
    private String overtimeType;

    // 审批人ID
    private Integer approverId;

    // 审批意见
    private String approvalComment;

    // Getter和Setter方法
    public Date getOvertimeDate() {
        return overtimeDate;
    }

    public void setOvertimeDate(Date overtimeDate) {
        this.overtimeDate = overtimeDate;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public float getHours() {
        return hours;
    }

    public void setHours(float hours) {
        this.hours = hours;
    }

    public String getOvertimeType() {
        return overtimeType;
    }

    public void setOvertimeType(String overtimeType) {
        this.overtimeType = overtimeType;
    }

    public Integer getApproverId() {
        return approverId;
    }

    public void setApproverId(Integer approverId) {
        this.approverId = approverId;
    }

    public String getApprovalComment() {
        return approvalComment;
    }

    public void setApprovalComment(String approvalComment) {
        this.approvalComment = approvalComment;
    }
}